-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[No QA] Set the user preferences correctly on Onyx #3717
Conversation
@@ -69,7 +69,7 @@ function getUserDetails() { | |||
// Update the User onyx key | |||
const loginList = _.where(response.loginList, {partnerName: 'expensify.com'}); | |||
const expensifyNewsStatus = lodashGet(response, 'account.subscribed', true); | |||
Onyx.merge(ONYXKEYS.USER, {loginList, expensifyNewsStatus}); | |||
Onyx.merge(ONYXKEYS.USER, {loginList, expensifyNewsStatus: !!expensifyNewsStatus}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why we're using evaluating to a truthy value here, what is the expected value of expensifyNewsStatus
? A number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the Api returns Int 1, 0 and we want to save Boolean
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense, thanks!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging in version: 1.0.73-4🚀
|
🚀 Deployed to production in version: 1.0.74-0🚀
|
Details
Fixed Issues
Fixes #3569
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android